#!/usr/bin/env bash
# Copyright (c) 2021 maminjie <maminjie2@huawei.com>
# SPDX-License-Identifier: MulanPSL-2.0

realpath=$(readlink -f "$0")
basedir=$(dirname "$realpath")

readonly PROG="ola"
readonly DESC="automatic work tools."
readonly VERSION="0.0.5"
readonly CONFIG_FILE="$HOME/.ola.conf"


. "$basedir"/src/base.sh

load "$basedir"/src/utils
load "$basedir"/src/libs
load "$basedir"/src/apps


main() {
    local subcmd=$1

    subcmd=$(alias_fullname "$subcmd")
    if [ "$(method_exists "$subcmd")" ]; then
        shift
        eval do_"$subcmd" \"\$@\"
    else
        do_usage "$@"
    fi
}

main "$@"
